<?php

class dbaCustomerInfo{

  function dbaCustomerInfo (&$dba){
    $this->dba = &$dba;
  }

  function send ($subject,$text,$from){
    $this->dba->query("select email,name,vorname from ".$this->dba->tableforwarder."_shopCustomer;");
    for ($i=0;$i<$this->dba->num_rows();$i++){
      $dset = $this->dba->fetch_row_array();
      mail($dset['email'],$subject,preg_replace('/<%=\$name%>/',$dset['name'],preg_replace('/<%=\$vorname%>/',$dset['vorname'],$text)),"From: $from");
    }
  }
}

?>
